Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add async support to dfu-core #27

Merged
merged 2 commits into from
Nov 9, 2024
Merged

Conversation

sjoerdsimons
Copy link
Contributor

Allow implementation using both sync and async I/O; The async support is enabled with the "async" feature (assume "std"). Tested using dfu-libusb (no changes needed) and a new implementation using nusb (https://github.com/sjoerdsimons/dfu-nusb). dfu-nusb supports both sync and async support.

Fwiw, i'd be happy to host dfu-nusb in this organisation, but that's somewhat seperate from this PR :)

Contrary to its name DfuSansIo actually contains an I/O object and
triggers I/O operations. This in particular makes it impossible to
create both sync and async implementation.

Transform DfuSansIo and its actions to a pure SansIo strategy by
returning the operation to execute rather then actually execute the
operation direction.
Create a async io implementation (DfuAsyncIo) similar to the current
sync implementation (DfuSync). This can be enabled by the "async
feature".
@cecton
Copy link
Member

cecton commented Nov 4, 2024

Hello! Sorry for the long delay. I invite you to the organization :) Thank you so much for joining! You can of course help maintain all the projects of the org and add dfu-nusb to it

@cecton
Copy link
Member

cecton commented Nov 4, 2024

@sjoerdsimons I let you merge and make a release so you get a hand of it? I'm using cargo-release but feel free to use whatever works and improve the process if you want to

@sjoerdsimons
Copy link
Contributor Author

@sjoerdsimons I let you merge and make a release so you get a hand of it? I'm using cargo-release but feel free to use whatever works and improve the process if you want to

Sure i can do that; might need to wait till the weekend though :)

@sjoerdsimons sjoerdsimons merged commit 231655f into dfu-rs:main Nov 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants